package cn.scxy.bookcity.controller;

import cn.scxy.bookcity.pojo.vo.CarouselChartListVO;
import cn.scxy.bookcity.pojo.vo.CategoryListVO;
import cn.scxy.bookcity.pojo.vo.HotSearchListVO;
import cn.scxy.bookcity.service.IUserIndexService;
import cn.scxy.bookcity.service.impl.CarouselChartService;
import cn.scxy.bookcity.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 用户首页的控制器
 * @author zzr
 */
@RestController
@RequestMapping("/carouselcharts")
@Api(tags = "轮播图")
public class CarouserlChartController {
    @Autowired
    private CarouselChartService service;
    @ApiOperation("查询轮播图列表")
    @ApiOperationSupport(order = 303)
    @GetMapping("/CarouselChartList")
    public JsonResult<List<CarouselChartListVO>> CarouselChartList(){
        System.out.println(service.list());
        List<CarouselChartListVO> list = service.list();
        return JsonResult.ok(list);
    }



}
